package com.jframework.module.usps.beans.rates;

import java.util.ArrayList;
import java.util.List;

import com.jframework.module.usps.beans.ResponseError;
import com.jframework.module.usps.beans.Package;


/**
 * 
 * @author AJain
 *
 */
public class IntlRateResponsePackage   
       implements Package
{

    private String prohibitions = null;
    private String restrictions= null;
    private String observations=null;
    private String customsForms= null;
    private String expressMail = null;
    private String areasServed = null;
    private ResponseError error = null;
    private String ID	= null;
//    IntlRateResponsePackageService
    protected List list	= null;

    public IntlRateResponsePackageService[] getService()
    {
	if (null == this.list) return null;
	IntlRateResponsePackageService[] serviceArray = new IntlRateResponsePackageService[list.size()];
        return (IntlRateResponsePackageService[]) list.toArray(serviceArray);
    }

    
    public boolean addService(IntlRateResponsePackageService aService)
    {
	if (null == this.list) this.list = new ArrayList();
        if (!list.contains(aService))
	  return list.add(aService);
        
        return false;
    }
    
    public void setService(IntlRateResponsePackageService[] services)
    {
        if (null != services)        
         for (int i=0; i < services.length; i++)
         {
            this.addService(services[i]);
         }
    }
 
    
    public boolean equals(Object obj)
    {
	if (null != obj
	 && obj instanceof IntlRateResponsePackage
	 && this.ID.equalsIgnoreCase(((IntlRateResponsePackage)obj).getID())
	)
	   return true;
	
	return false;
    }


    /**
     * @return the areasServed
     */
    public String getAreasServed() {
        return areasServed;
    }


    /**
     * @param areasServed the areasServed to set
     */
    public void setAreasServed(String areasServed) {
        this.areasServed = areasServed;
    }


    /**
     * @return the customsForms
     */
    public String getCustomsForms() {
        return customsForms;
    }


    /**
     * @param customsForms the customsForms to set
     */
    public void setCustomsForms(String customsForms) {
       this.customsForms = customsForms;
    }


    /**
     * @return the error
     */
    public ResponseError getError() {
        return error;
    }


    /**
     * @param error the error to set
     */
    public void setError(ResponseError error) {
        this.error = error;
    }


    /**
     * @return the expressMail
     */
    public String getExpressMail() {
        return expressMail;
    }


    /**
     * @param expressMail the expressMail to set
     */
    public void setExpressMail(String expressMail) {
        this.expressMail = expressMail;
    }


    /**
     * @return the iD
     */
    public String getID() {
        return ID;
    }


    /**
     * @param id the iD to set
     */
    public void setID(String id) {
        ID = id;
    }


    /**
     * @return the observations
     */
    public String getObservations() {
        return observations;
    }


    /**
     * @param observations the observations to set
     */
    public void setObservations(String observations) {
        this.observations = observations;
    }


    /**
     * @return the prohibitions
     */
    public String getProhibitions() {
        return prohibitions;
    }


    /**
     * @param prohibitions the prohibitions to set
     */
    public void setProhibitions(String prohibitions) {
        this.prohibitions = prohibitions;
    }


    /**
     * @return the restrictions
     */
    public String getRestrictions() {
        return restrictions;
    }

    /**
     * @param restrictions the restrictions to set
     */
    public void setRestrictions(String restrictions) {
        this.restrictions = restrictions;
    }

}
